package com.itheima.service.Impl;

import com.itheima.Dao.BookDao;
import com.itheima.Dao.Impl.BookDaoImpl;
import com.itheima.service.BookService;

public class BookServiceImpl implements BookService {
    //5.删除new BookDaoImpl();不使用new创建对象，降低service层和dao层的耦合度
    //    BookDao book=new BookDaoImpl();
    BookDao bookDaosss;

    public void setBookDaosss(BookDao bookDaosss) {
        this.bookDaosss = bookDaosss;
    }

    @Override
    public void save() {
        bookDaosss.save();
        System.out.println("book  service save... ");
    }
    //6.这里需要提供set方法给容器调用，是容器可以将对象传入到这里

}
